// 统一请求路径前缀在libs/axios.js中修改
import {
  getRequest,
  putRequest,
  postRequest,
  deleteRequest
} from "@/libs/axios"

//   获取分页
export const getMember = params => {
  return getRequest("/member/getByPage", params)
}


// 分页获取会员评价
export const getMemberReview = params => {
  return getRequest("/memberEvaluation/getByPage", params)
}

// 获取id
export const getMemberInfoReview = id => {
  return getRequest(`/memberEvaluation/get/${id}`)
}


// 清空异常会员
export const clearMember = () => {
  return deleteRequest(`/member/clean`)
}
// 删除评论
export const delMemberReview = id => {
  return putRequest(`/memberEvaluation/delete/${id}`)
}
// 修改评价状态
export const updateMemberReview = (id, params) => {
  return putRequest(`/memberEvaluation/updateStatus/${id}`, params)
}


//  添加或修改
export const insertOrUpdateSpec = params => {
  return postRequest("/memberNoticeSenter/insertOrUpdate", params)
}

//  获取会员列表
export const getMemberListData = params => {
  return getRequest("/member", params)
}
//  获取c端会员列表总合计
export const MemberListAll = params => {
  return getRequest("/member/getCMemberListAll", params)
}

//  获取会员详情
export const getMemberInfoData = params => {
  return getRequest(`/member/getAllMember`, params)
}

//  修改会员基本信息
export const updateMember = (params) => {
  return putRequest(`/member`, params)
}

//  添加会员基本信息
export const addMember = params => {
  return postRequest(`/member`, params)
}

//  获取会员列表
export const getMemberAll = () => {
  return getRequest("/member/getAll")
}

//  增加或修改会员列表
export const operationMemberListData = params => {
  return postRequest("/member/insertOrUpdate", params)
}

//  增加或修改会员列表
export const deleteMemberListData = ids => {
  return deleteRequest(`/member/delByIds/${ids}`)
}
// 获取充值记录列表数据
export const getUserRecharge = params => {
  return getRequest("/recharge", params)
}

// 获取预存款明细列表数据
export const getUserWallet = params => {
  return getRequest("/wallet/log", params)
}

// 获取提现申请列表数据
export const getUserWithdrawApply = params => {
  return getRequest("/members/withdraw-apply", params)
}

// 获取提现流水明细
export const getquerySellAll = params => {
  return getRequest("/members/wallet/querySellAll", params)
}

// 审核提现申请
export const withdrawApply = params => {
  return postRequest("/members/withdraw-apply", params)
}

//会员状态修改
export const updateMemberStatus = params => {
  return putRequest("/member/updateMemberStatus", params)
}

// 获取会员注册统计列表
export const getMemberStatistics = params => {
  return getRequest("/statistics/member", params)
}


// 获取流量统计
export const getStatisticsList = params => {
  return getRequest("/statistics/view/list", params)
}

// 获取会员历史流量
export const historyMemberChartList = () => {
  return getRequest("/statistics/view/online/history")
}

//查询会员数量
export const getMemberNum = params => {
  return getRequest("/member/num", params)
}
//查询会员历史积分
export const getHistoryPointData = (params) => {
  return getRequest(`/member/memberPointsHistory/getByPage`, params)
}
//查询会员的收货地址
export const getMemberAddressData = (id, params) => {
  return getRequest(`/member/address/${id}`, params)
}
//删除会员地址
export const removeMemberAddress = (id) => {
  return deleteRequest(`/member/address/delById/${id}`)
}
//添加会员收货地址
export const addMemberAddress = (params) => {
  return postRequest(`/member/address`, params)
}
//修改会员收货地址
export const editMemberAddress = (params) => {
  return putRequest(`/member/address`, params)
}
//查询会员预存款
export const getMemberWallet = (params) => {
  return getRequest(`/members/wallet`, params)
}

//会员等级列表
export const getMembergrade = (params) => {
  return getRequest(`/grade`, params)
}
//新增/编辑 会员等级
export const getaddMembergrade = (params) => {
  return postRequest(`/grade`, params)
}
//会员等级详情
export const getdetMembergrade = (id) => {
  return getRequest(`/grade/${id}`)
}
//删除会员等级
export const getdelMembergrade = (id) => {
  return deleteRequest(`/grade/delById/${id}`)
}

//  获取注销身份人记录列表
// export const getCancellationAll = () => {
//   return getRequest("/member/getAll");
// };

//  获取注销身份人审核列表
export const getCancellationList = (params) => {
  return getRequest(`/revoke/partner/getByPage`, params)
}

//  获取已解绑名单列表
export const getUnbindDataList = (params) => {
  return getRequest(`/revoke/partner/getLowList`, params)
}

//  审核意见提交
export const submitExamine = (params) => {
  return postRequest(`/revoke/partner/audit`, params)
}

//  退回金额保存
export const safeReturnAmount = (params) => {
  return postRequest(`/revoke/partner/getBackMsg`, params)
}
// ----------------------财务管理下的交易流水-------------------------------

// 交易流水  充值金额
export const getRechargeMoney = (params) => {
  return getRequest(`/recharge/getAll`, params)
}
// 交易流水列表
export const getRechargelist = (params) => {
  return getRequest(`/recharge/gitLuys`, params)
}
// 交易流水详情
export const getdetRechargelist = (params) => {
  return getRequest(`/recharge/gitLuys`, params)
}
// 转账管理
export const transferList = (params) => {
  return getRequest(`/member/transfer/list`, params)
}
// 异常会员/getDisableMemberPage
export const getDisableMemberPage = (params) => {
  return getRequest(`/member/getDisableMemberPage`, params)
}
//合伙人异常会员/abnormalPartnerList
export const abnormalPartnerList = (params) => {
  return getRequest(`/member/abnormalPartnerList`, params)
}
// 合伙人禁用状态
export const updatePartner = (params) => {
  return putRequest(`/member/updatePartner`, params)
}
// 合伙人注销状态
export const disablePartner = (params) => {
  return putRequest(`/member/disabledPartner`, params)
}
// 合伙人异常会员总计
export const abnormalPartnerListAll = (params) => {
  return getRequest(`/member/abnormalPartnerListAll`, params)
}
// 充值钱包收入
export const getIncome = (params) => {
  return getRequest(`/member/getIncome`, params)
}
// 充值钱包收入总和
export const getIncomeByPageCount = (params) => {
  return getRequest(`/member/getIncomeByPageCount`, params)
}
//支出数据/manager/member/getBranch
export const getBranch = (params) => {
  return getRequest(`/member/getBranch`, params)
}
// 充值钱包支出总和
export const getBranchByPageCount = (params) => {
  return getRequest(`/member/getBranchByPageCount`, params)
}

//推广钱包收入接口总和
export const getIncomePromoteByPageCount = (params) => {
  return getRequest(`/member/getIncomePromoteByPageCount`, params)
}
//推广钱包收入接口
export const getIncomePromote = (params) => {
  return getRequest(`/member/getIncomePromote`, params)
}
// 推广钱包支出接口
export const getBranchPromote = (params) => {
  return getRequest(`/member/getBranchPromote`, params)
}
// 推广钱包支出接口总和
export const getBranchPromoteByPageCount = (params) => {
  return getRequest(`/member/getBranchPromoteByPageCount`, params)
}
// 销售钱包收入列表数据
export const getIncomeSale = (params) => {
  return getRequest(`/member/getIncomeSale`, params)
}
// 销售钱包收入总和
export const getIncomeSaleByPageCount = (params) => {
  return getRequest(`/member/getIncomeSaleByPageCount`, params)
}
// 销售钱包支出列表数据
export const getBranchSale = (params) => {
  return getRequest(`/member/getBranchSale`, params)
}
// 销售钱包支出总和
export const getBranchSaleByPageCount = (params) => {
  return getRequest(`/member/getBranchSaleByPageCount`, params)
}
// 解绑会员
export const unBindingMemberList = params => {
  return postRequest(`/member/unBindingMemberList`, params)
}
// 城市合伙人下会员列表
export const getDisableMemberPageAll2 = params => {
  return getRequest(`/member/getDisableMemberPageAll2`, params)
}
//  获取C端会员列表
export const getCMemberList = params => {
  return getRequest("/member/getCMemberList", params)
}
//  修改会员地区
export const updateMemberRegion = params => {
  return putRequest("/member/updateRegion", params)
}

//  修改会员地区历史记录
export const updateMemberRegionHistory = params => {
  return putRequest("/member/getRegionDetailList", params)
}
